﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using SistemaAcademicoBO.Entities;
using SistemaAcademicoDAL;
using SistemaAcademicoBO;

namespace SistemaAcademicoBLL.Managers
{
    public class SubjectInDegreeCourseManager
    {
        private SubjectInDegreeCourseDAO subjectInDegreeCourseDAO;

        public SubjectInDegreeCourseManager()
        {
            subjectInDegreeCourseDAO = new SubjectInDegreeCourseDAO();
        }

        public SubjectInDegreeCourse GetSubjectInDegreeCourse(int id)
        {
            return (SubjectInDegreeCourse)subjectInDegreeCourseDAO.GetRecord(id);
        }

        public List<SubjectInDegreeCourse> GetAllSubjectInDegreeCourses()
        {
            List<IEntity> entityList = subjectInDegreeCourseDAO.GetAllRecords();
            List<SubjectInDegreeCourse> subjectInDegreeCourseList = new List<SubjectInDegreeCourse>();
            foreach (IEntity entity in entityList)
            {
                subjectInDegreeCourseList.Add((SubjectInDegreeCourse)entity);
            }

            return subjectInDegreeCourseList;
        }

        public void SetSubjectInDegreeCourse(SubjectInDegreeCourse subjectInDegreeCourse)
        {
            subjectInDegreeCourseDAO.SetRecord(subjectInDegreeCourse);
        }

        public void RemoveSubjectInDegreeCourse(int id)
        {
            subjectInDegreeCourseDAO.RemoveRecord(id);
        }
    }
}
